using UnityEngine;
using System.Collections;

public class PlayerHangState : State<PlayerControl>
{
    #region Singleton

    public static PlayerHangState Instance = new PlayerHangState();
    private PlayerHangState() { }

    #endregion

    #region State

    public override void OnEnterState(PlayerControl behaviour)
    {
        //behaviour.gameObject.renderer.material.color = Color.magenta;
        behaviour.targetSpeed = Vector3.zero;
    }

    public override void OnUpdateState(PlayerControl behaviour)
    {
        // Fall
        if (!Input.GetButton(Constants.HANG_BUTTON))
            behaviour.State = PlayerFallingState.Instance;

        // Climb
    }

    public override void OnFixedUpdateState(PlayerControl behaviour)
    {
    }

    public override void OnExitState(PlayerControl behaviour)
    {
    }

    public override void OnCollisionState(PlayerControl behaviour, Collision other)
    {
    }

    public override void OnTriggerState(PlayerControl behaviour, Collider other)
    {
    }

    #endregion
}
